{template "content","header_picture"}
<!-- 面包屑 begin -->
<div class="breadcrumb">
<h3>搜索列表</h3><div class="crumbs"><a href="{siteurl($siteid)}">首页</a><span> > </span>{catpos($catid)} 列表</div>
</div>
<!-- end 面包屑-->

<!-- main  begin -->
<div class="main leftside clearfix">
    <script type="text/javascript" src="js/blocksit.min.js"></script>
	<div id="wrapper">
		<div id="container">
            {if count($datalist)>0}
            {loop $datalist $r}
            <div class="grid">
                <div class="imgholder"><img class="lazy" src="images/pixel.gif" data-original="{thumb($r[thumb],216,0)}" width="215" /></div>
                <strong>{$r[title]}</strong>
                <p>{$r[info]}</p>
                <div class="meta"><a href="{$r[url]}" target="_blank">点击查看>>></a></div>
            </div>
            {/loop}
            {else}
            <h3 style="text-align:center;padding:50px 0px">呃！木有找到任何数据，请更换搜索条件再试！</h3>
            {/if}
		</div>
	</div>
    <script type="text/javascript">
        $(function(){
            $("img.lazy").lazyload({
                load:function(){
                    $('#container').BlocksIt({
                        numOfCol:4,
                        offsetX: 8,
                        offsetY: 8
                    });
                }
            });

            $(window).scroll(function(){
                // 当滚动到最底部以上600像素时， 加载新内容
                if ($(document).height() - $(this).scrollTop() - $(this).height()<2000){
                    //滚动加载数据
                    loadData();
                }
            });

            //window resize
            var currentWidth = 1001;
            $(window).resize(function() {
                var winWidth = $(window).width();
                var conWidth;
                if(winWidth < 660) {
                    conWidth = 440;
                    col = 2
                } else if(winWidth < 880) {
                    conWidth = 660;
                    col = 3
                } else if(winWidth < 1001) {
                    conWidth = 880;
                    col = 4;
                } else {
                    conWidth = 1001;
                    col = 4;
                }

                if(conWidth != currentWidth) {
                    currentWidth = conWidth;
                    $('#container').width(conWidth);
                    $('#container').BlocksIt({
                        numOfCol: col,
                        offsetX: 8,
                        offsetY: 8
                    });
                }
            });
        });
    </script>

</div>
<!-- end main -->
{template "content","footer"}


